package org.ResearchProject.pojo;

import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

/**
 * 2024-12-13-13:04
 */
@Data
public class User {
    // 唯一标识
    public Integer id;
    // 用户名
    @NotEmpty(groups = {register.class,login.class},message = "用户名不能为空")
    public String username;
    // 密码
    @NotEmpty(groups = {register.class,login.class},message = "密码不能为空")
    public String password;
    // 邮箱
    @NotEmpty(groups = {register.class},message = "邮箱不能为空")
    public String email;
    // 电话号码
    public Integer phoneNum;
    // 地址
    public String address;
    // 头像路径
    public String avatar;
    // 性别，0：男，1：女
    public Integer gender;
    // 姓名
    @NotEmpty(groups = {register.class},message = "姓名不能为空")
    public String name;
    // 权限
    @NotNull(groups = {register.class,login.class},message = "权限不能为空")
    public Integer auth;
    // 绑定微信
    public String wxOpenid;
    public interface register{};
    public interface login{};
}

